package com.hwg.shiliupro.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hwg.shiliupro.po.SessionList;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface SessionListMapper extends BaseMapper<SessionList> {
    int addUnReadCount(@Param("userId") Integer userId, @Param("toUserId") Integer toUserId);

    Integer selectByUserIdAndToUserId(@Param("userId") Integer userId, @Param("toUserId") Integer toUserId);

    List<SessionList> selectByUserId(Integer id);

    int delUnReadCount(@Param("fromUserId") Integer fromUserId, @Param("toUserId") Integer toUserId);

    List<Integer> selectToUserIdByFromUserId(Integer userId);
}
